package cn.helios.config;

import cn.helios.domian.Store;
import cn.helios.ulit.Ajaxresult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;


@Component
public class FeignLoggerFactory implements FallbackFactory<ProductFeignClient> {


    @Override
    public ProductFeignClient create(Throwable throwable) {
        return new ProductFeignClient() {
            @Override
            public Ajaxresult add(Store store) {

                Ajaxresult ajaxresult = new Ajaxresult();

                ajaxresult.setMsg("繁忙");

                ajaxresult.setSess(false);

                return ajaxresult;
            }
        };
    }
}
